import { onLoad, onShow } from "@dcloudio/uni-app";
import { useI18n } from 'vue-i18n';


export function useNavigationBar(pageName) {
  const { t } = useI18n();
 

  onShow(() => {
    // const [page] = getCurrentPages()
    // console.log('page', page)
    // const path = page.$page.route;
    // const [_,pageName] = path.split('/')
    // debugger
    uni.setNavigationBarTitle({
      title: t(`${pageName}.title`),
    });
  })
}